home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group97b.txt / 000133_icon-group-sender _Mon Dec 8 12:31:57 1997.msg < prev    next >
Internet Message Format  |  2000-09-20  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
  3.     by baskerville.CS.Arizona.EDU (8.8.7/8.8.7) with SMTP id MAA08434
  4.     for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Mon, 8 Dec 1997 12:31:54 -0700 (MST)
  5. Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
  6.     id AA07912; Mon, 8 Dec 1997 12:31:53 -0700
  7. Date: Mon, 8 Dec 1997 08:47:18 -0800
  8. From: kwalker@premenos.com (Ken Walker)
  9. Message-Id: <199712081647.IAA00778@varda.premenos.com>
  10. To: icon-group@baskerville.CS.Arizona.EDU, turk@ionet.net
  11. Subject: Re: Two Problems
  12. Mime-Version: 1.0
  13. Content-Type: text/plain; charset=us-ascii
  14. Content-Transfer-Encoding: 7bit
  15. Content-Md5: iaTEb+hvh8uW3dlouCzkXg==
  16. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  17. Status: RO
  18.  
  19. > Date: Sat, 06 Dec 1997 20:26:56 -0600
  20. > From: "Dr. Louis A. Turk" <turk@ionet.net>
  21. > ... I am having two problems:
  22. > 1.  "every i := find(word,line) do" will only find the first 5 instances of
  23. > word in line, then it fails.  Why is this?
  24.  
  25. Can you give an example of when it fails? I ran the following program
  26. under version 9.0 of Icon on a Sparc without any problem.
  27.  
  28.   procedure main()
  29.         local word, line
  30.  
  31.         write(&version)
  32.  
  33.         line := "one two one three one four one five one six one seven one"
  34.         word:= "one"
  35.         every i := find(word, line) do
  36.                 write(i)
  37.   end
  38.  
  39.  
  40. > 2.  How can I set the number of spaces '\t' represents?  On my computer it
  41. > represents 8 spaces (if I counted right); I want it to represent 11 spaces
  42. > on anybody's computer.
  43.  
  44. '\t' is a single character. How it gets displayed depends on the software
  45. you use. Icon has no control over that. If you need a specific number
  46. of spaces, you must use space characters instead of tabs. Take a look
  47. at the detab() function. It lets you specify tab stops then replaces
  48. tab characters in a string with the appropriate number of spaces.
  49.  
  50. Ken Walker, kwalker@premenos.com
  51. Premenos Coporation, Concord, Ca. 94520
  52.  
  53.